# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
  helper :all # include all helpers, all the time
  protect_from_forgery # See ActionController::RequestForgeryProtection for details
  before_filter :init
  # Scrub sensitive parameters from your log
  # filter_parameter_logging :password
  private 
  def init()
     @description_length = 560
     @browser_class=detectClientBrowser()
 end
 
  def detectClientBrowser()
   case request.user_agent
      when /(gecko|opera|konqueror|khtml|webkit)/i
        return 'gecko'
      when /msie\s+7\.\d+/i
        return 'ie7'
      when /msie\s+6\.\d+/i
        return 'ie6'
      else
        return 'main'
   end
 end
end
